<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>layui</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

	<link href="../../static/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet">
	<link rel="stylesheet" href="../../static/vui/css/vui.css">

	<script type="text/javascript" src="../../static/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="../../static/js/jquery.cookie.min.js"></script>
	<script type="text/javascript" src="../../static/layer/layer.js"></script>
	<script type="text/javascript" src="../../static/vui/js/vui.js"></script>
	<script type="text/javascript" src="../../static/js/common.js"></script>
</head>
<body>

<div id="table"></div>

<script>
    $(function(){

        var params = app.getRequestParams();



        function getOpenFrame(){
            if( params.index ==- 1 ){
                return parent;
            }else{
                return parent.frames[0];
            }
        }

        vui.datagrid({
            id:'table',pagination:false,
            url:app.BASE_API_URL+'user/page',
            dblClickRow:function(row){
                getOpenFrame().vui.query("setValue",params.queryId,row.id,row.name);
                app.closeLastWindow();
            },
            columns:[
                {field:'name',title:'用户姓名',width:100},
                {field:'username',title:'登录名',width:100},
                {field:'phone',title:'手机号码',width:100},
                {field:'companyName',title:'所属公司',width:100},
                {field:'organizationName',title:'所属部门',width:100}

            ]
        });
    });

</script>
</body>
</html>